new Swiper('#swiper-banner', {
  loop: true,
  slidesPerView: 1,
  observer: true,
  observeParents: true,
  pagination: {
    el: '#swiper-banner .swiper-pagination',
    clickable: true,
  },
  navigation: {
    nextEl: '#swiper-banner .swiper-button-next',
    prevEl: '#swiper-banner .swiper-button-prev',
  },
  autoplay: {
    delay: 3000,//3秒切换一次
  },
})


// var $pagis = $('.home-product .pod-ul .pod-list')
, $contents = $('#slide-main .slide-box');

$("#product-swiper .swiper-wrapper .swiper-slide").each(function(index) {
  $(this).on('mouseenter', function() {
      $(this).addClass('active').siblings().removeClass('active');
      $contents.eq(index).addClass('active').siblings().removeClass('active');
  })
})

new Swiper('#chooseus-swiper', {
  slidesPerView: 4,
  spaceBetween: 40,
  breakpoints: { 
    //当宽度小于等于320
   767: {
      slidesPerView: 1,
      spaceBetween: 0,
      noSwiping: false,
      pagination: {
        el: '#chooseus-swiper .swiper-pagination',
        clickable: true,
      },
    }
  }
})

new Swiper('#product-swiper', {
  slidesPerView: 4,
  breakpoints: { 
    //当宽度小于等于320
    1024: {
      slidesPerView: 3,
      spaceBetween: 10,
      noSwiping: false,
      pagination: {
        el: '#product-swiper .swiper-pagination',
        clickable: true,
      },
    },
   767: {
      slidesPerView: 1,
      spaceBetween: 0,
      noSwiping: false,
      pagination: {
        el: '#product-swiper .swiper-pagination',
        clickable: true,
      },
    }
  },
})

new Swiper('#aboutLeft-swiper', {
  slidesPerView: 4,
  spaceBetween: 13,
  pagination: {
    el: '#aboutLeft-swiper .swiper-pagination',
    clickable: true,
  },
  breakpoints: { 
    //当宽度小于等于320
    1440: {
      slidesPerView: 3,
      spaceBetween: 10,
    },
    1024: {
      slidesPerView: 4,
      spaceBetween: 10,
    },
    992: {
      slidesPerView: 3,
      spaceBetween: 10,
    },
    767: {
      slidesPerView: 2,
    }
  },
})

new Swiper('#about-swiper', {
  slidesPerView: 2,
  spaceBetween: 20,
  slidesPerColumn: 2,
  // pagination: {
  //   el: '#about-swiper .swiper-pagination',
  //   clickable: true,
  // },
  breakpoints: { 
    //当宽度小于等于320
    1024: {
      slidesPerView: 4,
      spaceBetween: 10,
      slidesPerColumn: 1
    },
    992: {
      slidesPerView: 3,
      spaceBetween: 10,
      slidesPerColumn: 1,
      noSwiping: false,
      pagination: {
        el: '#about-swiper .swiper-pagination',
        clickable: true,
      },
    },
    767: {
      slidesPerView: 1,
      slidesPerColumn: 1,
      noSwiping: false,
      pagination: {
        el: '#about-swiper .swiper-pagination',
        clickable: true,
      },
    }
  },
})

new Swiper('#case-swiper', {
  slidesPerView: 3,
  spaceBetween: 25,
  pagination: {
    el: '#case-swiper  .swiper-pagination',
    clickable: true,
  },
  breakpoints: { 
    1024: {
      slidesPerView: 2,
      spaceBetween: 10,
    },
    767: {
      slidesPerView: 1,
    }
  },
})

new Swiper('#news-swiper', {
  slidesPerView: 3,
  spaceBetween: 30,
  observer: true,
  observeParents: true,
  // allowTouchMove:false,
  breakpoints:{
    1024: { 
      slidesPerView: 2,
      allowTouchMove:true,
      noSwiping: false,
      pagination: {
        el: '#news-swiper .swiper-pagination',
        clickable: true,
      }
    },
    767: {
      slidesPerView: 1,
      noSwiping: false,
      pagination: {
        el: '#news-swiper .swiper-pagination',
        clickable: true,
      }
    }
  },
})


$(function(){
  //鏁板瓧婊氬姩
  if($('.anime-num').length){
    $('.anime-num').countUp();
  }
});

$(function(){
  new WOW().init();
})